const oper = {
  bind(el, binding) {
    el.addEventListener('click', e => {
      const temp = window.location.href.split('//')[1].split('/')
      let path = '/'
      temp.forEach((v, i) => {
        if (i === 0) return
        path += v + '/'
      })
      path = path.substring(0, path.length - 1)
      console.log('path:', path)
    }, false)
  }
}
const install = function(Vue) {
  Vue.directive('oper', oper)
}
oper.install = install
export default oper

